#!/bin/bash
sed -i -e "s/mirror\.centos\.org/mirrors\.aliyun\.com/" /etc/yum.repos.d/CentOS-OpenStack-pike.repo
sed -i -e "s/mirror\.centos\.org/mirrors\.aliyun\.com/" /etc/yum.repos.d/CentOS-Ceph-Jewel.repo
sed -i -e "s/mirror\.centos\.org/mirrors\.aliyun\.com/" /etc/yum.repos.d/CentOS-QEMU-EV.repo
yum clean all
yum makecache


echo '[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://mirrors.aliyun.com/mongodb/yum/redhat/$releasever/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
'>/etc/yum.repos.d/mongodb-org-3.4.repo